package com.springboot.myspringbootframework.web.mq.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "hello")
public class Consumer {

    @RabbitHandler
    public void process(String message){
        System.out.println(message);
        System.out.println("接收到啦");
    }
}
